package org.xb.SimpleStrategyPattern;

/**
 * @Author
 * @Description
 * @Date created in 16:13 2023/12/5
 */
public class Context {
    private CashSuper cashSuper;

    public Context(CashSuper cashSuper) {
        this.cashSuper = cashSuper;
    }
    //上下文接口
    //根据具体的策略对象，调用其算法的方法
    public void ContextInterface(double money){
        double v = cashSuper.acceptCash(money);
        System.out.println("一共消费" + v);
    }
}
